package com.jx.driving.request;

import com.jx.driving.message.TimeTerminalRequestMessage;
import com.jx.driving.protocol.terminal.annotation.ByteAnnotation;
import com.jx.driving.protocol.terminal.annotation.ObjectAnnotation;
import com.jx.driving.protocol.terminal.annotation.TerminalAnnotation;
import com.jx.driving.request.domain.Directable;
import com.jx.driving.request.domain.DynamicObject;

/**
 * 数据上行透传
 * 
 * @author shenliuyang
 *
 *         2016年8月14日下午4:10:32
 */
@TerminalAnnotation
public class Terminal0x0900Request extends TimeTerminalRequestMessage implements Directable {
	private static final long serialVersionUID = -7449538751961843399L;
	@ByteAnnotation(order = 1)
	private short type = 0x13;// 透传消息类型
	@ObjectAnnotation(order = 2)
	private DynamicObject object;// 消息内容

	public short getType() {
		return type;
	}

	public void setType(short type) {
		this.type = type;
	}

	public DynamicObject getObject() {
		return object;
	}

	public void setObject(DynamicObject object) {
		this.object = object;
	}

	@Override
	public DynamicObject dynamicObject() {
		return this.object;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Terminal0x0900Request [type=").append(type).append(", object=").append(object).append("]");
		return builder.toString();
	}

}
